package com.zhouchao.persistence.session;

import java.util.List;

public interface SqlSession {

    // 查询所有
    <T> List<T> selectList(String statementId, Object... params) throws Exception;

    // 根据条件查询单个对象
    <T> T selectOne(String statementId, Object... params) throws Exception;

    int insert(String statementId, Object params) throws Exception;

    int update(String statementId, Object params) throws Exception;

    int delete(String statementId, Object params) throws Exception;

    // 生成代理类
    <T> T getMapper(Class<?> mapperClass);
}
